'use strict';
module.exports = function(sequelize, DataTypes) {
  var comment = sequelize.define('comment', {
    id: {
      type: DataTypes.UUID,
      primaryKey: true,
      defaultValue: DataTypes.UUIDV1
    },
    score: DataTypes.INTEGER,
    description: DataTypes.TEXT,
    images: DataTypes.BLOB,
    targetId: {
      type: DataTypes.UUID,
      allowNull: false,
      validate: {
        isUUID: true
      }
    }
  }, {
    classMethods: {
      associate: function(models) {
        // associations can be defined here
      }
    },
    timestamps: true,
    updatedAt: false,
    paranoid: true
  });
  return comment;
};
